Dynomotion

Group: DynoMotion Message: 1996 From: zarbink Date: 10/22/2011
Subject: VB.NET Help
Hello all,

First off I am new here and thank in advance for any help. I am trying to see if it is create a simple program in vb.net to control a 3 axis robotic arm. Unfortunately I don't know C# and although I could learn, I'd rather program in vb.net since that is what I am most comfortable in.

In my project I have added the Kmotion_dotnet.DLL to my project. Could someone provide a simple code to say "move" 1 motor?

If I have a starting point, I think I can build off of that.

Example: Under some event

KMotion_dotNet.KM_CoordMotionStraightFeedHandler(???)

Thanks all
Group: DynoMotion Message: 2001 From: brad murry Date: 10/22/2011
Subject: Re: VB.NET Help
Hello,
 
It has been some time since I programmed in VB or winforms so I decided to put together a little VB.net Winforms app and had some fun.

 You can download it here::

http://sourceforge.net/projects/cnctw/files/VB.net/DynoMotion%20VB.net.zip/download
 
 
 
With the simple GUI you can move axes, jog axes, toggle IO, interpret a G-code file and make coordmotion calls.
 
 
 
 ...hope this gets you on your way
 
-Brad Murry
Group: DynoMotion Message: 2003 From: Tom Kerekes Date: 10/23/2011
Subject: Re: VB.NET Help
Brad you are amazing! 

See a screen shot of Brad's example.


Here is an experimental release V4.27x that now includes:

 .NET interface - KMotion_dotNet +
KMotion_dotNet_Interop
  C# Console Example - KMotion_dotNet Console
  Brad's VB .net example -
DynoMotion VB.net

(Note the DSP Firmware included is the same as V4.26 so no need to FLASH firmware to run this)

All the Executables and DLLs are  targeted to the <Install>\KMotion\Debug or <Install>\KMotion\Release so there is no need to set any paths.

It should be possible to build all the debug libraries and examples using VS2008 Standard Version with the following procedure:


   #2 Build all the libraries:  Open <Install>\BuildAllLibs.sln  then Build

   #3 Run the VB example: Open <Install>\PC VB Examples\Dynomotion VB.net\Dynomotion VB.net.sln  then Build | Run

   #4 Run the C# example: Open <Install>\PC VCS Examples\\KMotion_dotNet Console\\KMotion_dotNet Console.sln then Build | Run

The Release directory has the compiled executables for the examples if you just wish to run them.

Thanks
TK


From: brad murry <bradodarb@...>
To: dynomotion@yahoogroups.com
Sent: Saturday, October 22, 2011 8:27 PM
Subject: RE: [DynoMotion] VB.NET Help

 
Hello,
 
It has been some time since I programmed in VB or winforms so I decided to put together a little VB.net Winforms app and had some fun.

 You can download it here::

http://sourceforge.net/projects/cnctw/files/VB.net/DynoMotion%20VB.net.zip/download
 
 
 
With the simple GUI you can move axes, jog axes, toggle IO, interpret a G-code file and make coordmotion calls.
 
 
 
 ...hope this gets you on your way
 
-Brad Murry
Group: DynoMotion Message: 2011 From: brad murry Date: 10/24/2011
Subject: Re: VB.NET Help
No no... KFLOP is amazing, I am just moving bits around( and having to much fun during). Its really cool to see the .net stuff in there with the new build.

I am nearly done with the MM update and while working on it I think I found some missing public members.  I think traverse sped in coordmotion was one of them.

Can you think of any others?

-Brad Murry

From: Tom Kerekes
Sent: 10/23/2011 2:37 AM
To: DynoMotion@yahoogroups.com
Subject: Re: [DynoMotion] VB.NET Help

 

Brad you are amazing! 

See a screen shot of Brad's example.


Here is an experimental release V4.27x that now includes:

 .NET interface - KMotion_dotNet +
KMotion_dotNet_Interop
  C# Console Example - KMotion_dotNet Console
  Brad's VB .net example -
DynoMotion VB.net

(Note the DSP Firmware included is the same as V4.26 so no need to FLASH firmware to run this)

All the Executables and DLLs are  targeted to the <Install>\KMotion\Debug or <Install>\KMotion\Release so there is no need to set any paths.

It should be possible to build all the debug libraries and examples using VS2008 Standard Version with the following procedure:


   #2 Build all the libraries:  Open <Install>\BuildAllLibs.sln  then Build

   #3 Run the VB example: Open <Install>\PC VB Examples\Dynomotion VB.net\Dynomotion VB.net.sln  then Build | Run

   #4 Run the C# example: Open <Install>\PC VCS Examples\\KMotion_dotNet Console\\KMotion_dotNet Console.sln then Build | Run

The Release directory has the compiled executables for the examples if you just wish to run them.

Thanks
TK


From: brad murry <bradodarb@...>
To: dynomotion@yahoogroups.com
Sent: Saturday, October 22, 2011 8:27 PM
Subject: RE: [DynoMotion] VB.NET Help

 
Hello,
 
It has been some time since I programmed in VB or winforms so I decided to put together a little VB.net Winforms app and had some fun.

 You can download it here::

http://sourceforge.net/projects/cnctw/files/VB.net/DynoMotion%20VB.net.zip/download
 
 
 
With the simple GUI you can move axes, jog axes, toggle IO, interpret a G-code file and make coordmotion calls.
 
 
 
 ...hope this gets you on your way
 
-Brad Murry
Group: DynoMotion Message: 2025 From: brad murry Date: 10/24/2011
Subject: Re: VB.NET Help
Another nudge for anyone interested in pointing out some missing members in the .net interop......
 
Hoping to have it buttoned up tonight.
 

-Brad Murry 
Group: DynoMotion Message: 2026 From: Tom Kerekes Date: 10/24/2011
Subject: Re: VB.NET Help
No I don't have a good understanding of how that stuff works.  I will add any that anyone discovers missing ASAP.
 
BTW development in C# or VB should now be possible with the free version of Visual Studio Express from Microsoft.
 
Isn't that correct? (I haven't tried it).
 
Regards
TK
 
 

Group: DynoMotion Message: 2027 From: brad murry Date: 10/24/2011
Subject: Re: VB.NET Help
Sorry, in my haste I must have been unclear!
 
 
I meant that I was missing some important public members in the .net wrapper of CoordMotion(and possibly other classes such as KmotionDLL and GcodeInterpreter).
 
Things like:
 

bool m_Simulate;

bool m_AxisDisabled;
 
 
 

bool m_DefineCS_valid;
 
etc....
 
and with things like m_DefineCS_valid, I could add in some better error handling(throw an exception to the user when a move is called on an invalid CS, etc...).

 
So basically, I am wanting to make sure that the .net wrapper classes in KMotion_dotNet have all the right public members to be at least as functional as their c++ origins; using a comparison map such as this:
 
 
KM_Controller.cs == KMotionDLL.cpp/KmotionDLL.h
 
KM_Controller.CoordMotion.cs == CoordMotion.cpp/CoordMotion.h
 
KM_Controller.Interpreter.cs == GcodeInterpreter.cpp/GcodeInterpreter.h
 
 
I would like to minimize the possibility of being able to accomplish something in c++ that you cannot on the .net side.
 
 
Thanks,
Brad Murry

Group: DynoMotion Message: 2028 From: brad murry Date: 10/24/2011
Subject: Re: VB.NET Help
Also, very important-
 
 
How is the speed used for CoordMotion.StraightTraverse(args...) derived?
 
Is it just using the lowest speed of the defined axes? 
 
 
The GCodeInterpreter has TraverseSpeed that is defined internally by the interpreter's setupparams (which I expose on the .net side).
 
I want to make sure I am not missing an opportunity to expose Traverse Speed as a public member in the KM_Controller.CoordMotion class as well, but do not see it anywhere.
 
 
-Brad Murry
Group: DynoMotion Message: 2031 From: Tom Kerekes Date: 10/25/2011
Subject: Re: VB.NET Help
Hi Brad,
 
Currently the PC doesn't need to know or care about the max Velocity, Acceleration, or Jerk for each axis for StraightTransverse (G0 Rapid moves) as well as Acceleration and Jerk for Jogging.   The PC just tells KFLOP to move or jog and KFLOP computes the 3rd order independent trajectory for each axis using the current axis settings.  This permits faster smoother Rapids than for example Mach3 which does everything 2nd order.  Admittedly this is confusing for users.  The Coordinate Motion Trajectory Planner constraints are set in the PC code and the Non-coordinated motion constraints are set in KFLOP code.  And worse the units on the PC are in inches (and inches/sec) and the units in KFLOP are in counts (counts/sec, counts/sec^2).  I suppose it may be better to have the Non-coordinated constraints set in the GUI like the coordinated motion constraints and then just set them all in KFLOP before doing any move or jog.   But then I see some disadvantages to this.  I don't see a good overall solution.  This is currently how it works.
 
Regards
TK 

Group: DynoMotion Message: 2034 From: brad murry Date: 10/25/2011
Subject: Re: VB.NET Help
You can absolutely use Visual Studio Express to work with the .net libraries, I use VS2010c# express on my net book for testing when I am on the road.
 
-Brad Murry
 
  
Group: DynoMotion Message: 2035 From: bradodarb Date: 10/25/2011
Subject: Re: VB.NET Help
Hello Tom,


Am I understanding you correctly that there is no currently existing method to limit the motion params on traverse moves?

Given the choice I always prefer to work with raw counts from the development side. This way it is all a consistent conversion when providing a mechanism for the user to select their unit system and all required conversion calculations are handled in software.

That is just my opinion...


-Brad Murry

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Brad,
>  
> Currently the PC doesn't need to know or care about the max Velocity, Acceleration, or Jerk for each axis for StraightTransverse (G0 Rapid moves) as well as Acceleration and Jerk for Jogging.   The PC just tells KFLOP to move or jog and KFLOP computes the 3rd order independent trajectory for each axis using the current axis settings.  This permits faster smoother Rapids than for example Mach3 which does everything 2nd order.  Admittedly this is confusing for users.  The Coordinate Motion Trajectory Planner constraints are set in the PC code and the Non-coordinated motion constraints are set in KFLOP code.  And worse the units on the PC are in inches (and inches/sec) and the units in KFLOP are in counts (counts/sec, counts/sec^2).  I suppose it may be better to have the Non-coordinated constraints set in the GUI like the coordinated motion constraints and then just set them all in KFLOP before doing any move or jog.   But then I see some
> disadvantages to this.  I don't see a good overall solution.  This is currently how it works.
>  
> Regards
> TK 
>
> From: brad murry <bradodarb@...>
> To: dynomotion@yahoogroups.com
> Sent: Monday, October 24, 2011 10:10 PM
> Subject: RE: [DynoMotion] VB.NET Help
>
>
>  
> Also, very important-
>  
>  
> How is the speed used for CoordMotion.StraightTraverse(args...) derived?
>  
> Is it just using the lowest speed of the defined axes? 
>  
>  
> The GCodeInterpreter has TraverseSpeed that is defined internally by the interpreter's setupparams (which I expose on the .net side).
>  
> I want to make sure I am not missing an opportunity to expose Traverse Speed as a public member in the KM_Controller.CoordMotion class as well, but do not see it anywhere.
>  
>  
> -Brad Murry
>
> To: DynoMotion@yahoogroups.com
> From: tk@...
> Date: Mon, 24 Oct 2011 19:28:25 -0700
> Subject: Re: [DynoMotion] VB.NET Help
>
>  
> No I don't have a good understanding of how that stuff works.  I will add any that anyone discovers missing ASAP.
>  
> BTW development in C# or VB should now be possible with the free version of Visual Studio Express from Microsoft.
>  
> Isn't that correct? (I haven't tried it).
>  
> Regards
> TK
>  
>  
>
> From: brad murry <bradodarb@...>
> To: dynomotion@yahoogroups.com
> Sent: Monday, October 24, 2011 6:43 PM
> Subject: RE: [DynoMotion] VB.NET Help
>
>
>  
> Another nudge for anyone interested in pointing out some missing members in the .net interop......
>  
> Hoping to have it buttoned up tonight.
>  
>
> -Brad Murry 
>
> To: DynoMotion@yahoogroups.com
> From: bradodarb@...
> Date: Mon, 24 Oct 2011 08:45:07 -0600
> Subject: RE: [DynoMotion] VB.NET Help
>
>  
> No no... KFLOP is amazing, I am just moving bits around( and having to much fun during). Its really cool to see the .net stuff in there with the new build.
>
> I am nearly done with the MM update and while working on it I think I found some missing public members.  I think traverse sped in coordmotion was one of them.
>
> Can you think of any others?
>
> -Brad Murry
> From: Tom Kerekes
> Sent: 10/23/2011 2:37 AM
> To: DynoMotion@yahoogroups.com
> Subject: Re: [DynoMotion] VB.NET Help
>
>
>  
>
>
> Brad you are amazing! 
>
> See a screen shot of Brad's example.
>
>
>
> Here is an experimental release V4.27x that now includes:
>
>  .NET interface - KMotion_dotNet + KMotion_dotNet_Interop
>   C# Console Example - KMotion_dotNet Console
>   Brad's VB .net example -DynoMotion VB.net
>
>
> (Note the DSP Firmware included is the same as V4.26 so no need to FLASH firmware to run this)
>
>
> All the Executables and DLLs are  targeted to the <Install>\KMotion\Debug or <Install>\KMotion\Release so there is no need to set any paths.
>
> It should be possible to build all the debug libraries and examples using VS2008 Standard Version with the following procedure:
>
>    #1 download and install http://www.dynomotion.com/Software/KMotion427x.exe
>
>
>    #2 Build all the libraries:  Open <Install>\BuildAllLibs.sln  then Build
>
>    #3 Run the VB example: Open <Install>\PC VB Examples\Dynomotion VB.net\Dynomotion VB.net.sln  then Build | Run
>
>    #4 Run the C# example: Open <Install>\PC VCS Examples\\KMotion_dotNet Console\\KMotion_dotNet Console.sln then Build | Run
>
> The Release directory has the compiled executables for the examples if you just wish to run them.
>
> Thanks
> TK
>
>
> From: brad murry <bradodarb@...>
> To: dynomotion@yahoogroups.com
> Sent: Saturday, October 22, 2011 8:27 PM
> Subject: RE: [DynoMotion] VB.NET Help
>
>
>  
> Hello,
>  
> It has been some time since I programmed in VB or winforms so I decided to put together a little VB.net Winforms app and had some fun.
>
>  You can download it here::
>
> http://sourceforge.net/projects/cnctw/files/VB.net/DynoMotion%20VB.net.zip/download
>  
>  
>  
> With the simple GUI you can move axes, jog axes, toggle IO, interpret a G-code file and make coordmotion calls.
>  
>  
>  
>  ...hope this gets you on your way
>  
> -Brad Murry
>
> To: DynoMotion@yahoogroups.com
> From: bsosebee@...
> Date: Sat, 22 Oct 2011 21:14:14 +0000
> Subject: [DynoMotion] VB.NET Help
>
>  
> Hello all,
>
> First off I am new here and thank in advance for any help. I am trying to see if it is create a simple program in vb.net to control a 3 axis robotic arm. Unfortunately I don't know C# and although I could learn, I'd rather program in vb.net since that is what I am most comfortable in.
>
> In my project I have added the Kmotion_dotnet.DLL to my project. Could someone provide a simple code to say "move" 1 motor?
>
> If I have a starting point, I think I can build off of that.
>
> Example: Under some event
>
> KMotion_dotNet.KM_CoordMotionStraightFeedHandler(???)
>
> Thanks all
>
Group: DynoMotion Message: 2036 From: Tom Kerekes Date: 10/25/2011
Subject: Re: VB.NET Help
Hi Brad,
 
You can set the motion params for all the axis using script commands: Accel, Vel, Jerk. But like I tried to explain it seems best to just let the user configure all those from a C program.
 
TK
 

Group: DynoMotion Message: 2037 From: brad murry Date: 10/25/2011
Subject: Re: VB.NET Help
Fair enough.  I am calling these script commands in the AxisNode_DM.cs class.
 
I agree for some users it will be easy enough to create or modify a c program to configure(and a lot less noise down the line..), but to provide this configuration functionality from a GUI, I decided to go the script route backed by XML to hold and persist the data.
 
 
Again, I am a little slow hearing what you are saying...(Don't like to assume things)
 
Let me see if I got it this time:
 
 You are calculating the third order profile based on the Accel, Velocity and Jerk that reside in the axis settings that are set by either a c program or the scripting commands.
 
And..... in your third order profile it can be understood that no axis' max velocity or accel will be exceeded during the traverse.
 
If that is the case, simply setting these params (Accel, Vel, Jerk) will ensure a safe profile is used on Traverse moves?
 
 
Thank you for you patience,
-Brad Murry
Group: DynoMotion Message: 2038 From: Tom Kerekes Date: 10/25/2011
Subject: Re: VB.NET Help
Hi Brad,
 
That is all correct.  But realize that each axis moves independently as fast as it can dependent on its current KFLOP settings so the overall motion is likely to not be a straight line.
 
Regards
TK

Group: DynoMotion Message: 2098 From: zarbink Date: 11/2/2011
Subject: Re: VB.NET Help
Brad,

Huge help.That will get me a long way. I keep getting a 'KMotion_dotNet.DMException' but I think I can figure it out. Was this compiled in VS 2008? Again, thanks for your help!


Regards

--- In DynoMotion@yahoogroups.com, brad murry <bradodarb@...> wrote:
>
>
> Hello, It has been some time since I programmed in VB or winforms so I decided to put together a little VB.net Winforms app and had some fun.
> You can download it here::
>
> http://sourceforge.net/projects/cnctw/files/VB.net/DynoMotion%20VB.net.zip/download With the simple GUI you can move axes, jog axes, toggle IO, interpret a G-code file and make coordmotion calls. ...hope this gets you on your way -Brad MurryTo: DynoMotion@yahoogroups.com
> From: bsosebee@...
> Date: Sat, 22 Oct 2011 21:14:14 +0000
> Subject: [DynoMotion] VB.NET Help
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Hello all,
>
>
>
> First off I am new here and thank in advance for any help. I am trying to see if it is create a simple program in vb.net to control a 3 axis robotic arm. Unfortunately I don't know C# and although I could learn, I'd rather program in vb.net since that is what I am most comfortable in.
>
>
>
> In my project I have added the Kmotion_dotnet.DLL to my project. Could someone provide a simple code to say "move" 1 motor?
>
>
>
> If I have a starting point, I think I can build off of that.
>
>
>
> Example: Under some event
>
>
>
> KMotion_dotNet.KM_CoordMotionStraightFeedHandler(???)
>
>
>
> Thanks all
>
Group: DynoMotion Message: 2099 From: brad murry Date: 11/2/2011
Subject: Re: VB.NET Help
Hello,
 
     Yes, it was compiled in VS2008.
 
 
If you can tell me when/where the exception is being thrown I will try to point you in the right direction.
 
 
-Brad Murry